/*
 * @(#)BusinessException.java
 *
 * Copyright 2012 by ShenY BIS, All rights reserved.
 */

package com.bis.framework.exception;

import com.bis.framework.util.common.COConstants;

/**
 * BusinessException
 * 
 * @author BIS 2012-12-24
 */
public class BusinessException extends RuntimeException
{

    /**
     * Version Id
     */
    private static final long serialVersionUID = 1L;
    /**
     * Type
     */
    private int               type             = COConstants.EXCEPTION_FORM;
    /**
     * Causer
     */
    private Throwable         cause;

    /**
     * BusinessException
     */
    public BusinessException()
    {
        super();
    }

    /**
     * BusinessException
     * @param message
     */
    public BusinessException(String message)
    {
        super(message);
    }

    /**
     * BusinessException
     * @param t
     */
    public BusinessException(Throwable t)
    {
        super(t.getMessage());
        this.cause = t;
    }

    /**
     * @return the type
     */
    public int getType()
    {
        return type;
    }

    /**
     * @param type the type to set
     */
    public void setType(int type)
    {
        this.type = type;
    }

    /**
     * @return the cause
     */
    public Throwable getCause()
    {
        return cause;
    }

    /**
     * @param cause the cause to set
     */
    public void setCause(Throwable cause)
    {
        this.cause = cause;
    }

}
